package com.atguigu.gmall.product.rpc;

import com.atguigu.gmall.model.product.SpuSaleAttr;
import com.atguigu.gmall.product.service.SpuSaleAttrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author A
 * @version 1.0
 * @description: TODO
 * @date 2025/8/30 0:52
 */
@RestController
@RequestMapping("/rpc/inner/product")
public class RpcSpuController {
    @Autowired
    private SpuSaleAttrService spuSaleAttrService;

    @GetMapping("/getSpuSaleAttr")
    public List<SpuSaleAttr> getSpuSaleAttr(@RequestParam("skuId") Long skuId){

        return spuSaleAttrService.getSpuSaleAttrListAndChecked(skuId);
    }

}
